Gateway methods are not methods to access a remote host directly. These methods are intended to pass firewalls or proxy servers. Therefore, they can be used for proxy host declarations (see Multi-hops) only.
A gateway method must come always along with a method who supports port setting. This is because tramp targets the accompanied method to localhost#random_port, from where the firewall or proxy server is accessed to.
Gateway methods support user name and password declarations. These are used to authenticate towards the corresponding firewall or proxy server. They can be passed only if your friendly administrator has granted your access.
As authentication method, only Basic Authentication (see RFC 2617) is
implemented so far. If no port number is given in the
declaration, port 8080 is used for the proxy
server.
The default port number of the socks server is 1080, if not specified otherwise.